package answer

func xorQueries(arr []int, queries [][]int) []int {
	result := make([]int, 0)
	for _, query := range queries {
		left, right := query[0], query[1]
		temp := 0
		for left <= right {
			temp ^= arr[left]
			left++
		}
		result = append(result, temp)
	}
	return result
}
